Improved error message when yt-dlp is not installed and is needed to get a file from...
authorJoey Hess <joeyh@joeyh.name>
Wed, 27 Aug 2025 13:11:49 +0000 (09:11 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 27 Aug 2025 13:11:49 +0000 (09:11 -0400)
Annex/YoutubeDl.hs
CHANGELOG

index 722823b60b342f83444ce707910a0c6df4bfe1c3..90159280786545e465426e901f303878f7b317ae 100644 (file)
@@ -60,8 +60,7 @@ youtubeDlNotAllowedMessage = unwords
 --
 -- Displays a progress meter as youtube-dl downloads.
 --
--- If no file is downloaded, or the program is not installed,
--- returns Right Nothing.
+-- If no file is downloaded, returns Right Nothing.
 --
 -- youtube-dl can write to multiple files, either temporary files, or
 -- multiple videos found at the url, and git-annex needs only one file.
@@ -93,7 +92,7 @@ youtubeDl' url workdir p uo
                                        [] -> return (Right Nothing)
                                        _ -> return (Left $ cmd ++ " download is incomplete. Run the command again to resume.")
                                Left msg -> return (Left msg)
-                       , return (Right Nothing)
+                       , return (Left $ cmd ++ " is not installed.")
                        )
        | otherwise = return (Right Nothing)
   where
index 1e43b9638f0b82f9e140927a093632875c1cfd07..013b46c2e5810ca5a12823dabfef8fc773e9655b 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -30,6 +30,8 @@ git-annex (10.20250722) UNRELEASED; urgency=medium
   * tahoe: Fix bug that made initremote require an encryption= parameter,
     despite git-annex encryption not being used with this special remote.
     Fixes reversion introduced in version 7.20191230.
+  * Improved error message when yt-dlp is not installed and is needed to
+    get a file from the web.
   * Removed support for git versions older than 2.22.
   * Bump aws build dependency to 0.24.1.
   * stack.yaml: Update to lts-24.2.